package cn.com.surker.control.service.impl;

import cn.com.surker.control.dao.ControlExpendBatchDao;
import cn.com.surker.control.entity.ControlExpendBatch;
import cn.com.surker.control.entity.vo.ControlExpendBatchVo;
import cn.com.surker.control.service.ControlExpendBatchService;
import cn.com.surker.util.StringUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 工控机原始消耗盘表 服务实现类
 * </p>
 *
 * @author admin
 * @since 2025-01-06
 */
public abstract class ControlExpendBatchBaseImpl extends ServiceImpl<ControlExpendBatchDao, ControlExpendBatch> implements ControlExpendBatchService {

	@Resource
	protected ControlExpendBatchDao controlExpendBatchDao;

	@Override
	public List<ControlExpendBatch> findList(String dbCode, Long controlInvId) {
		if (StringUtils.isBlank(dbCode)) {
			return null;
		}
		List<ControlExpendBatch> batchList = controlExpendBatchDao.findList(dbCode, controlInvId);
		return batchList;
	}

	@Override
	public List<ControlExpendBatchVo> findDetailList(String dbCode, Long conInvId) {
		if (StringUtils.isBlank(dbCode)) {
			return null;
		}
		List<ControlExpendBatchVo> batchList = controlExpendBatchDao.findDetailList(dbCode, conInvId);
		return batchList;
	}
}